#include<iostream>
#include<algorithm>
using namespace std;
const int N = 2e5 + 10;
int n, d, h;
int a[N];
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n >> d >> h;
		for (int i = 1; i <= n; i++)cin >> a[i];
		double ans = (d * h * n) * 1.0 / 2;
		double sum = 0;
		sort(a + 1, a + n + 1);	
		for (int i = 1; i <= n - 1; i++) {
			if (a[i] + h > a[i + 1]) {
				int x = (a[i] + h) - a[i + 1];
				sum += (x * x) * 1.0;
			}
		}
		
		printf("%.6lf\n", (ans * 1e6 - sum * 1e6) * 1.0 / 1e6);
	}
	return 0;
}